package com.work.web.filter;

public class UrlFilter {
    //需要拦截的请求地址
    public static String filterPath = "/api/wcustomer/**,/api/device/**,/api/deviceInfo/**,/api/cropsDisease/**,/api/crops/**,/api/cropsIndex/**,/api/customer/**,/api/custuser/**,/api/menu/**,/api/role/**,/api/farm/**,/api/farmland/**,/api/farmCrops/**,/api/farmDevice/**,/api/order/**,/api/menu/**,/api/role/**,/api/user/**,/api/webDevice/**,/api/web/user/**";
    public static boolean hasAuthorize(String url){
        String[] split = filterPath.replace("/**", "").split(",");
        for (String value : split) {
            if (url.startsWith(value)){
                return true;
            }
        }
        return false;
    }
}
